# $Id: PKGBUILD 60996 2011-12-20 11:28:38Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=arm-wince-cegcc-importlibs
pkgver=0.59.1
pkgrel=2
_prefix=/opt/cegcc
pkgdesc="CE GCC bundle - cross compilation tools for WinCE"
arch=(any)
license=(GPL)
options=(!libtool)
url="http://cegcc.sf.net"
depends=()
makedepends=('arm-wince-cegcc-binutils')
options=(!strip)
groups=('cegcc')
source=(http://arch.p5n.pp.ru/~sergej/dl/cegcc-$pkgver.tar.bz2)
md5sums=('5e3c1098abdf8e5db2a3518ee3578b4b')

build() {
  cd $srcdir/cegcc/src/

  export PATH=$_prefix/bin:$PATH
  export TARGET=arm-wince-cegcc
  unset CFLAGS
  unset LDFLAGS

  mkdir -p $pkgdir/${_prefix}/arm-wince-cegcc/lib
  cd cegcc/importlibs
  ./build.sh ./defs $pkgdir/${_prefix}/arm-wince-cegcc/lib
  find $pkgdir/${_prefix} -type f -name \*.a -exec arm-wince-cegcc-ranlib {} \;
}
